package com.kaisu.blog.infrastructure.blog;

import com.kaisu.blog.infrastructure.user.UserPO;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;


@Getter
@Setter
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@Table(name = "`like`")
public class LikePO {
    /**
     * id
     */
    @Id
    private Long id;
    /**
     * blog
     */
    @ManyToOne
    @JoinColumn(name = "blog_id")
    private BlogPO blog;
    /**
     * user
     */
    @ManyToOne
    @JoinColumn(name = "user_id")
    private UserPO user;
}